From 1250fddc619243b6564ffc8b4117f58d4b833a50 Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Sat, 16 Feb 2019 13:41:25 -0700 Subject: [PATCH] Set Qt version floor at 5.9 (#304) * move Qt floor to 5.9. * update coverage build for Qt archive naming. * update all travis builds to xenial. trusty is EOL 4/2019. * avoid 5.12.1 on linux CI. * Revert "avoid 5.12.1 on linux CI." This reverts commit b86212123cda9d7c57f212f3baf0f05bc3121ee5. * avoid 5.12.1 on linux CI. --- .travis.yml | 8 ++++---- CMakeLists.txt | 4 ++-- GPSBabel.pro | 2 +- configure | 2 +- configure.ac | 2 +- gui/main.cc | 2 +- main.cc | 2 +- tools/travis_install_linux_coverage | 9 +++------ tools/travis_install_linux_local | 2 +- tools/travis_install_osx | 2 +- 10 files changed, 16 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index b9ac0bca3..0e02aac37 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,14 +3,14 @@ language: cpp matrix: include: - os: linux - dist: trusty + dist: xenial sudo: required services: docker compiler: gcc env: - BUILD_TYPE="docker" - os: linux - dist: trusty + dist: xenial sudo: required services: docker compiler: clang @@ -22,7 +22,7 @@ matrix: compiler: gcc env: - BUILD_TYPE="local" - - QT_VERSION="5.9.7" + - QT_VERSION="5.9.7" # 5.12.1 vtesto stmsdf fails differently on xenial & bionic addons: apt: packages: @@ -59,7 +59,7 @@ matrix: compiler: gcc env: - BUILD_TYPE="coverage" - - QT_VERSION="5.7.1" + - QT_VERSION="5.9.7" addons: apt: packages: diff --git a/CMakeLists.txt b/CMakeLists.txt index 613a28d2d..c52e5bb41 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,8 +21,8 @@ message("Qt5Core_DEFINITIONS List of definitions for use with add_definitions: \ message("Qt5Core_COMPILE_DEFINITIONS List of definitions for use with the COMPILE_DEFINITIONS target property: \"${Qt5Core_COMPILE_DEFINITIONS}\"") message("Qt5Core_FOUND Boolean describing whether the module was found successfully: \"${Qt5Core_FOUND}\"") message("Qt5Core_EXECUTABLE_COMPILE_FLAGS String of flags to be used when building executables: \"${Qt5Core_EXECUTABLE_COMPILE_FLAGS}\"") -if (${Qt5Core_VERSION} VERSION_LESS 5.7) - message(FATAL_ERROR "Qt version ${Qt5Core_VERSION} found, but version 5.7 or newer is required.") +if (${Qt5Core_VERSION} VERSION_LESS 5.9) + message(FATAL_ERROR "Qt version ${Qt5Core_VERSION} found, but version 5.9 or newer is required.") endif() include_directories(AFTER SYSTEM ${Qt5Core_INCLUDE_DIRS}) add_definitions(${Qt5Core_DEFINITIONS}) diff --git a/GPSBabel.pro b/GPSBabel.pro index 8adf38825..7864f543b 100644 --- a/GPSBabel.pro +++ b/GPSBabel.pro @@ -1,6 +1,6 @@ # Enforce minimum Qt version. # versionAtLeast() was introduced in Qt 5.10, so we can't count on it being available. -MIN_QT_VERSION = 5.7 # major[.minor[.patch]] +MIN_QT_VERSION = 5.9 # major[.minor[.patch]] MIN_QT_VERSION_COMPONENTS = $$split(MIN_QT_VERSION, .) MIN_QT_VERSION_MAJOR = $$member(MIN_QT_VERSION_COMPONENTS, 0) MIN_QT_VERSION_MINOR = $$member(MIN_QT_VERSION_COMPONENTS, 1) diff --git a/configure b/configure index e9d869320..e7a61b37d 100755 --- a/configure +++ b/configure @@ -6144,7 +6144,7 @@ fi # MIN_QT_VERSION in configure.ac should correspond to the QT_VERSION_CHECK arguments in main.cc and gui/main.cc -MIN_QT_VERSION=5.7 +MIN_QT_VERSION=5.9 if test "$QMAKE" = "no"; then : as_fn_error $? "Qt qmake (with QT_VERSION >= $MIN_QT_VERSION) is required but was not found." "$LINENO" 5 diff --git a/configure.ac b/configure.ac index 3daf07cee..55812e1b2 100644 --- a/configure.ac +++ b/configure.ac @@ -167,7 +167,7 @@ AC_CHECK_TOOLS(LUPDATE, [lupdate-qt5 lupdate]) AC_CHECK_TOOLS(LRELEASE, [lrelease-qt5 lrelease]) # MIN_QT_VERSION in configure.ac should correspond to the QT_VERSION_CHECK arguments in main.cc and gui/main.cc -MIN_QT_VERSION=5.7 +MIN_QT_VERSION=5.9 AS_IF([test "$QMAKE" = "no"], [ AC_MSG_ERROR([Qt qmake (with QT_VERSION >= $MIN_QT_VERSION) is required but was not found.]) ]) diff --git a/gui/main.cc b/gui/main.cc index f13d6943e..9ff9b7cf6 100644 --- a/gui/main.cc +++ b/gui/main.cc @@ -45,7 +45,7 @@ const char *pathSeparator = ":"; int main(int argc, char**argv) { // MIN_QT_VERSION in configure.ac should correspond to the QT_VERSION_CHECK arguments in main.cc and gui/main.cc -#if (QT_VERSION < QT_VERSION_CHECK(5, 7, 0)) +#if (QT_VERSION < QT_VERSION_CHECK(5, 9, 0)) #error this version of Qt is not supported. #endif diff --git a/main.cc b/main.cc index 8990f1a24..2d86a4193 100644 --- a/main.cc +++ b/main.cc @@ -230,7 +230,7 @@ main(int argc, char* argv[]) (void) new gpsbabel::UsAsciiCodec(); /* make sure a US-ASCII codec is available */ // MIN_QT_VERSION in configure.ac should correspond to the QT_VERSION_CHECK arguments in main.cc and gui/main.cc -#if (QT_VERSION < QT_VERSION_CHECK(5, 7, 0)) +#if (QT_VERSION < QT_VERSION_CHECK(5, 9, 0)) #error This version of Qt is not supported. #endif diff --git a/tools/travis_install_linux_coverage b/tools/travis_install_linux_coverage index 6e18492bb..479740339 100755 --- a/tools/travis_install_linux_coverage +++ b/tools/travis_install_linux_coverage @@ -27,15 +27,12 @@ function validate() { ) } -QT_VERSION=${1:-5.7.1} +QT_VERSION=${1:-5.12.1} QT_VERSION_SHORT=${QT_VERSION//./} -# older Qt releases use different package names and install locations. -QT_VERSION_XY=$(echo ${QT_VERSION} | cut -d "." -f -2) -QT_VERSION_XY_SHORT=${QT_VERSION_XY//./} # our expectation is that install-qt creates $QTDIR, $QTDIR/bin. CACHEDIR=${HOME}/Cache -QTDIR=${CACHEDIR}/Qt/${QT_VERSION_XY}/gcc_64 +QTDIR=${CACHEDIR}/Qt/${QT_VERSION}/gcc_64 if [ -d "${QTDIR}/bin" ]; then echo "Using cached Qt." @@ -46,7 +43,7 @@ else mkdir -p ${CACHEDIR} pushd ${CACHEDIR} # install-qt creates the install at $PWD/Qt. - QT_CI_PACKAGES=qt.${QT_VERSION_XY_SHORT}.gcc_64 QT_CI_DOWNLOADER="wget -nv -c" PATH=${TRAVIS_BUILD_DIR}/tools/qtci:${PATH} install-qt ${QT_VERSION} + QT_CI_PACKAGES=qt.qt5.${QT_VERSION_SHORT}.gcc_64 QT_CI_DOWNLOADER="wget -nv -c" PATH=${TRAVIS_BUILD_DIR}/tools/qtci:${PATH} install-qt ${QT_VERSION} popd validate rm ${CACHEDIR}/qt-opensource*.run diff --git a/tools/travis_install_linux_local b/tools/travis_install_linux_local index f8ddf1418..bf4fc21d6 100755 --- a/tools/travis_install_linux_local +++ b/tools/travis_install_linux_local @@ -27,7 +27,7 @@ function validate() { ) } -QT_VERSION=${1:-5.12.0} +QT_VERSION=${1:-5.12.1} QT_VERSION_SHORT=${QT_VERSION//./} # our expectation is that install-qt creates $QTDIR, $QTDIR/bin. diff --git a/tools/travis_install_osx b/tools/travis_install_osx index 28fa80909..dc9301538 100755 --- a/tools/travis_install_osx +++ b/tools/travis_install_osx @@ -27,7 +27,7 @@ function validate() { ) } -QT_VERSION=${1:-5.12.0} +QT_VERSION=${1:-5.12.1} QT_VERSION_SHORT=${QT_VERSION//./} # our expectation is that install-qt creates $QTDIR, $QTDIR/bin. -- 2.30.2